package section2;

public class PracticeVIII {
	public static void main(String[] args) {
		int sum1;
		for(int i=1000; i<10000; i++){
			sum1 = sumFun(i,10);
			if(sum1==sumFun(i,12)&&sum1==sumFun(i,16))
				System.out.println(i);
		}
	}
	private static int sumFun(int i, int base) {
		int sum = 0;
		while(i>0){
			sum = sum + i%base;
			i = i/base;
		}
		return sum;
	}
}
/*
Specialized Four-Digit Numbers

Sample Input
There is no input for this problem.

Sample Output
2992
2993
2994
2995
2996
2997
2998
2999

 * */






